home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Collection of Tools & Utilities
/
Collection of Tools and Utilities.iso
/
batchut
/
makemenu.zip
/
READ.ME
< prev
next >
Wrap
Text File
|
1989-05-09
|
12KB
|
280 lines
This is a subset of the EasyTool Utilities that contains all the utilities
you need to run MAKEMENU.BAT. The following describes how to use MAKEMENU.
It is excerpted from the EasyTool Utilities User Guide.
We then tell you more about the EasyTool Utilities, including how to get your
complete set.
=============================================================================
MAKEMENU Batch File
Purpose:
To create a batch file that provides a menu of commands.
Applications:
Used to create a batch file that displays text within a box,
centered on the screen.
Used to create multi-level menu systems.
Usage:
MAKEMENU name-of-menu
For example, "MAKEMENU CLEANUP" would let you create a menu batch
file named "CLEANUP.BAT".
Name-of-menu must not be the same as the name of any existing
program, batch file, or DOS command, since MAKEMENU will create
a batch file with the name "name-of-menu.BAT".
HOW THE MENU THAT YOU CREATE WORKS:
MAKEMENU asks you questions to create a menu. The menu is a
batch file that gives you choices (options) of what to do. When
you press the appropriate key, the menu does what you chose. It
then asks you to press any key to return to the main screen of
choices.
Although you can always exit from your menu by pressing Ctrl-C,
you'll probably want to specify a key to press to exit.
MAKEMENU asks you to specify:
a) A descriptive name for the menu (for example "Main Menu"):
The descriptive name that you specify will be appended to the
phrase "Press any key to return to ". The resulting phrase will
be shown whenever you are returning to the menu's main screen, to
help re-orient you. For example, suppose you specify "Clean-up
Menu" as your brief description. Whenever you have executed a
choice on the menu, and you are about to return to the menu,
"Press any key to return to Clean-up Menu..." will appear on the
screen.
b) The menu's text:
This is normally a menu title, followed by a list of choices and
instructions. For example:
C L E A N - U P M E N U
Press: D for directory listing
E to erase a set of files
X to exit
Your choice:
MAKEMENU draws a box around the text you specify and centers it
on the screen. The cursor will be positioned after the text,
within the box.
You can create your menu's screen with a word processor in non-
document mode or with a text editor, if you prefer that to typing
it at the keyboard: just put the text into a file named "name-
of-menu.MNU" (for example, "CLEANUP.MNU"). When you type your
text at the keyboard, MAKEMENU creates just such a file. In the
future, when you want to revise your menu, you can modify this
file with a text editor before starting MAKEMENU.
After you've specified how the screen appears, MAKEMENU asks you
to specify the following until you have no more options left to
specify:
c) A key that chooses an option. You simply press the key. In a
moment it will appear on the screen. Some keys, such as "Page
Down", will appear as graphic characters. Others, such as the
Return key, will be spelled out or abbreviated.
d) what happens when you press the key. You simply type the
command line(s) that do what you want. For example, you could
enter the command line "DIR | PAGE".
Any batch file that you call (invoke) should be preceded with
"COMMAND /C" if you want execution to return to the menu batch
file when done. (See "Executing Batch Files Within Batch
Files".) This is because the command lines that you type are
directly entered into the batch file. For example, "COMMAND /C
SUBMENU" would invoke SUBMENU, which itself could be another menu
batch file. By calling menus you can create a multi-level menu
system.
You can use labels, insert comments, and do anything else allowed
in a batch file. The labels "START" and "EXIT" are automatically
included in the menu batch file. To specify returning to the
menu's main screen, enter the command line "GOTO START". To
specify exiting from the menu, enter "GOTO EXIT".
You can make a menu that simply shows text on the screen and then
exits, by specifying menu text but not specifying any options.
After you have completely specified the menu, MAKEMENU
automatically invokes it so that you can test what you've just
created.
MODIFYING YOUR MENU:
When you are done with MAKEMENU, you can modify the lines in the
menu batch file that you have created, just like any other batch
file. Modify the PUT commands to change the menu's colors, to
change the screen position of the menu or of the cursor, etc.
(Type "PUT ?" for instructions on using PUT.)
You may even prefer to use MAKEMENU to simply create a skeleton
BAT file, and fill in the details later. For example, you might
use MAKEMENU to create a menu with options but for each option
simply execute "ECHO OPTION [#] CHOSEN". Then later you would
replace that line in the BAT file with the real command lines.
Limitations:
Descriptive name may contain up to 45 characters.
Menu text may contain up to 20 lines.
MAKEMENU will prevent you from entering certain characters such
as DOS redirection operators (<>|) in the menu name and text, and
from using those keys to choose an option. This is because DOS
would misinterpret them in the BAT file. However, the command
lines you enter may contain any characters.
===========================================================================
MAKEMENU is just one of fifty commands from the EasyTool Utilities. You
already have 14 of them, including MAKEMENU. You might want to try some of
the others.
For example, here are some command lines you might try for the X Utility:
X ECHO [S/\*]
echoes the names of all subdirectories that are immediately under the root
directory.
X TRY RD [S/\*]
removes any of the subdirectories echoed above that are empty. (TRY is
an EasyTool Utility that suppresses DOS's error message when RD, CD, or MD
fail.)
X COPY [FILE1,FILE2,FILE3,*.ARC,*.DOC] A:
is the equivelant of typing "COPY FILE1 A:" then "COPY FILE2 A:" etc.
for each of the filespecs that you list within the brackets.
X WS [*.DOC]
will put you into Wordstar with the first ".DOC" file. When you exit, you
will immediately return to Wordstar with the next ".DOC" file, and so forth
until you have gone through all ".DOC" files.
X MAKE [*.EXE,*.COM]
will MAKE all files with extention ".EXE" or ".COM".
You get the idea. . .
HOW TO EXIT
You can exit any EasyTool program by pressing Ctrl-C or the Break key.
HOW TO GET HELP
Some helpful information is available when you type the program name followed
by space and then question mark. (For example, "PUT ?" will show you some
information about the PUT program.) The complete documentation is in the
159 page User Guide, which you will receive when you register.
The complete set of EasyTool Utilities include the following commands:
access -- tells if subdirectory or file exists/can be accessed as desired
backward -- reverses sequence of lines or pages
blank -- blanks screen to help prevent burn-in
calc -- does calculations using numbers on command line or in file
case -- converts file to all upper or all lower case characters
col -- displays column-ruler across screen
colors -- shows 128 possible color combinations
decode -- puts graphic characters into file/displays ASCII values
define -- removes strings and, optionally, replaces them in file
delq -- asks whether to delete each file matching filespec(s)
demo -- demonstrates a few Utilities and how you might write a demo program
dinstall -- installs data path in certain EasyTool Utilities
echox -- copies text multiple times
ensure -- ensures that last character of file is the desired one
findat -- extracts or deletes lines from file (enhances DOS find)
get -- validates data, or lets user enter data
listcol -- prints text file listing in minimum space/multiple columns
log -- puts